package org.infodavid.common.persistence;

import java.io.Serializable;

/**
 * The Interface IQueryParameter.
 */
public interface IQueryParameter extends Serializable {
	/**
	 * The Enum EParameterType.
	 */
	enum EParameterType {
		/** The first row. */
		FIRST_ROW,

		/** The max rows. */
		MAX_ROWS,

		/** The hints. */
		HINTS,

		/** The ascending order. The value and name are ignored. */
		ORDER_ASCENDING,

		/** The descending order. The value and name are ignored. */
		ORDER_DESCENDING,
	}

	/** The order parameter. */
	String ORDER_PARAM = "orderParam";

	/**
	 * Initialize object state.
	 */
	void init();

	/**
	 * Gets the name.
	 * @return the name
	 */
	String getName();

	/**
	 * Gets the column name.
	 * @return the column name
	 */
	String getColumnName();

	/**
	 * Gets the value.
	 * @return the value
	 */
	Object getValue();

	/**
	 * Gets the value.
	 * @return the value
	 */
	EParameterType getType();

	/**
	 * Sets the name.
	 * @param value the name
	 * @return the query parameter
	 */
	IQueryParameter setName(String value);

	/**
	 * Sets the column name.
	 * @param value the column name
	 * @return the query parameter
	 */
	IQueryParameter setColumnName(String value);

	/**
	 * Sets the value.
	 * @param value the value
	 * @return the query parameter
	 */
	IQueryParameter setValue(Object value);

	/**
	 * Sets the value.
	 * @param value the type
	 * @return the query parameter
	 */
	IQueryParameter setType(EParameterType value);
}
